﻿using System;

namespace Rogan.Common
{
    /// <summary>
    /// 事务拦截属性
    /// BeginTransaction = true,开启事务 
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class DbControlAttribute : Attribute
    {
        public DbControlAttribute()
            : this(DbControlOption.Open)
        {

        }

        public DbControlAttribute(DbControlOption option)
        {
            this.ControlOption = option;
        }

        public DbControlOption ControlOption
        {
            get;
            set;
        }
    }
}
